﻿using Company.Sqlite.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace 无人值守地磅称重系统.Extentions
{
    internal static class DataExtentions
    {
        public static double CalcJweight(this Data data){
            data.Jweight = data.Mweight - (data.Pweight + data.Kweight);
            return data.Jweight;
        }

        public static void CalcSumPrice(this Data data)
        {
            data.SumPrice = data.Price * data.CalcJweight();
        }
    }
}
